<?php                                             
require_once 'conf.php';

require_once 'net/crashtoot/php/utils/AuthentificationUtils.php';
//require_once 'net/crashtoot/php/utils/ServerTools.php';
require_once 'net/crashtoot/php/picasa/viewer/PicasaUsersManager.class.php';
require_once 'net/crashtoot/php/picasa/model/PicasaUser.class.php';
require_once 'net/crashtoot/php/picasa/out/IPicasaOut.class.php';
require_once 'net/crashtoot/php/picasa/out/HighslidePicasaOut.class.php';
require_once 'net/crashtoot/php/picasa/out/MoonFlowPicasaOut.class.php';  
require_once 'net/crashtoot/php/picasa/out/GallerifficOut.class.php';
require_once 'net/crashtoot/php/picasa/viewer/Application.class.php';
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Http_Client_Adapter_Socket');

session_start();
 
$outManager = new HighslidePicasaOut();
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Ajax Picasa</title>

	<meta http-equiv="X-UA-Compatible" content="chrome=1" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="/css/default.css" type="text/css" />
	<link rel="stylesheet" href="/css/waitManager.css" type="text/css" />    
	
  <script type="text/javascript" src="/js/ext/prototype.js"></script>
	<script type="text/javascript" src="/js/ext/scriptaculous.js"></script>
	<script type="text/javascript" src="/js/picasaviewer.js"></script>
	<script type="text/javascript" src="/js/WaitManager.js"></script>
	<script type="text/javascript" src="/js/utils.js"></script>   
  
	<script type="text/javascript" src="/js/jquery-1.4.2.js"></script> 
  <script type="text/javascript" src="/js/jquery.address-1.2.1.js" ></script>   
  <script type="text/javascript">
    jQuery.noConflict();         
  </script>       

<?php
if ($outManager != null) {
    $outManager->outHeader();
}
?>
<script type="text/javascript">
<?php
if ($outManager != null) {
	$outManager->outJSHeader();
}
?>     
  var waitManager = new WaitManager();  

	Event.observe(window, 'load', function() {
    waitManager.init('body');       
	});
	 
	jQuery(document).ready(function(){
		//jQuery.address.value("/" + username + "/" + albumId);
		jQuery.address.title(jQuery('#title')[0].textContent);
  });
	
	Ajax.Responders.register({
		onCreate: function() {
			waitManager.start();
		},
		onComplete: function() {
			if(Ajax.activeRequestCount == 0){
				waitManager.stop();
			}
		}
	});
</script>
</head>
<body>
<!-- menu -->
<a href="/index.php" id="action_allalbums" onclick="waitManager.start();" style="float: left;">Tous les albums</a>
<span style="float: left;">&nbsp;</span>
<a href="/accounts/" id="action_accounts" onclick="waitManager.start();" style="float: left;">utilisateurs picasa</a>
<a href="/logout/" id="action_logout" style="float: right;">deconnection</a>
<br/><br/>
<!-- contenu -->
<div id="body" style="float: left;">
	<div id="content">
<?php
			
include "main.php";

?>
  </div>
</div>
</body>
</html>
